From abe0d573b20fb28174704ab1848f98a564e59bb3 Mon Sep 17 00:00:00 2001 From: "djm@kirby.fc.hp.com" Date: Sun, 18 Sep 2005 12:18:57 -0600 Subject: [PATCH] Add debug output for pfmon (default off, DEBUG_PFMON in config.h) --- xen/arch/ia64/xen/vcpu.c | 12 ++++++++++++ xen/include/asm-ia64/config.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/xen/arch/ia64/xen/vcpu.c b/xen/arch/ia64/xen/vcpu.c index c6bd1e5372..0764c16c33 100644 --- a/xen/arch/ia64/xen/vcpu.c +++ b/xen/arch/ia64/xen/vcpu.c @@ -1453,6 +1453,9 @@ IA64FAULT vcpu_set_pmc(VCPU *vcpu, UINT64 reg, UINT64 val) { // TODO: Should set Logical CPU state, not just physical // NOTE: Writes to unimplemented PMC registers are discarded +#ifdef DEBUG_PFMON +printf("vcpu_set_pmc(%x,%lx)\n",reg,val); +#endif ia64_set_pmc(reg,val); return (IA64_NO_FAULT); } @@ -1461,6 +1464,9 @@ IA64FAULT vcpu_set_pmd(VCPU *vcpu, UINT64 reg, UINT64 val) { // TODO: Should set Logical CPU state, not just physical // NOTE: Writes to unimplemented PMD registers are discarded +#ifdef DEBUG_PFMON +printf("vcpu_set_pmd(%x,%lx)\n",reg,val); +#endif ia64_set_pmd(reg,val); return (IA64_NO_FAULT); } @@ -1469,6 +1475,9 @@ IA64FAULT vcpu_get_pmc(VCPU *vcpu, UINT64 reg, UINT64 *pval) { // NOTE: Reads from unimplemented PMC registers return zero UINT64 val = (UINT64)ia64_get_pmc(reg); +#ifdef DEBUG_PFMON +printf("%lx=vcpu_get_pmc(%x)\n",val,reg); +#endif *pval = val; return (IA64_NO_FAULT); } @@ -1477,6 +1486,9 @@ IA64FAULT vcpu_get_pmd(VCPU *vcpu, UINT64 reg, UINT64 *pval) { // NOTE: Reads from unimplemented PMD registers return zero UINT64 val = (UINT64)ia64_get_pmd(reg); +#ifdef DEBUG_PFMON +printf("%lx=vcpu_get_pmd(%x)\n",val,reg); +#endif *pval = val; return (IA64_NO_FAULT); } diff --git a/xen/include/asm-ia64/config.h b/xen/include/asm-ia64/config.h index 268cd3ebff..af5c6893e0 100644 --- a/xen/include/asm-ia64/config.h +++ b/xen/include/asm-ia64/config.h @@ -9,6 +9,8 @@ #define VHPT_GLOBAL #define DOMU_AUTO_RESTART +#undef DEBUG_PFMON + // manufactured from component pieces // defined in linux/arch/ia64/defconfig -- 2.30.2